<?php
/**
 * Created by PhpStorm.
 * User: asus
 * Date: 2018/9/24
 * Time: 23:31
 */

class Commodity
{
    private $name;
    private $count;
    private $price;

    function show()
    {
        echo "书名为".$this->name."，价格为".$this->price."<br>";
    }

    function __set($name, $value)
    {
        $this->$name=$value;
    }
}